package passworks.Gates;

import passworks.*;

public class OR extends GateBase {


    public OR(int id) {
        super(id);

        className = "OR";

        Logger.Print(className, className, Direction.IN, ownID);
        Logger.Print(className, className, Direction.OUT, ownID);
    }

    public void SetOutputs() {
        Logger.Print(className, "SetOutputs", Direction.IN, ownID);
       
        /*
         * Tenyleges logika
         */
        Logger.Print(className, "SetOutputs", Direction.OUT, ownID);
        for(Wire w : input)
        {
            if(w.GetState()==true)

            {
                output.get(0).SetState(true);
                return;
            }
        }
        output.get(0).SetState(false);
      
    }
}
